package com.structure.flyWeight;

import java.util.HashMap;

public class FlyWeightFactory {

	static HashMap<String, FlyWeight> map = new HashMap<String, FlyWeight>();

	public FlyWeightFactory(String no) {
		map.put(no, new FlyWeightImp());

	}

	public static FlyWeight getFlyWeight(String no) {
		if (map.get(no) == null) {
			map.put(no, new FlyWeightImp());
		}
		return map.get(no);
	}

	public static int getSize() {
		return map.size();
	}
}
